package com.dhcc.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.dhcc.entity.Student;
import com.dhcc.entity.SysConfig;
import com.dhcc.service.StudentService;
import com.dhcc.service.SysConfigService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

@RestController
@RequestMapping("/slave/config")
public class SysConfigController {
	
	@Autowired
	private SysConfigService sysConfigService;

	@GetMapping("/list")
	public PageInfo<SysConfig> findSysConfig(){
		PageHelper.startPage(1, 10);
		List<SysConfig> findBySysConfig = sysConfigService.findSysConfigs();
		PageInfo<SysConfig> pageInfo = new PageInfo<>(findBySysConfig);
		return pageInfo;
	}
}
